# 发布订单 - 过滤函数
def filter_publish_order(order_detail):
    # 过滤订单详情
    code =  order_detail.get("code")
    if code == 10000:
        code = 0
    else:
        code = 1
        return {
            "code": code,
            "message": order_detail.get("message"),
        }
    
    return {
        "code": code,
        "message": order_detail.get("message"),
        "tradeNo": order_detail.get("data").get("tradeNo"),
        "status": order_detail.get("data").get("status"), # 2: 待接单 3: 代练中 4: 待验收
        "data": order_detail.get("data"),
    }




